
{extend name='table'}



{block name="content"}
<div class="layui-card padding-20 shadow layui-card-body" >
    {include file='secondary_card/index_search'}
    <table id="SecondaryCardTable" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
</div>
{/block}
{block name='script'}
<script>
    $(function () {
        // 初始化表格组件
        $('#SecondaryCardTable').layTable({
            even: true, height: 'full',
            sort: {field: 'id desc', type: 'desc'},
            cols: [[
                {checkbox: true, fixed: true},
                {title: '序号',type: 'numbers', width: 60},
                {field: 'title', title: '卡名称', align: "center", minWidth: 170},
                {field: 'amount', title: '累消或直充金额', align: "center", minWidth: 170},
                {field: 'low_amount', title: '每月低消', align: 'center', minWidth: 140},
                {field: 'remark', title: '描述', align: 'center', minWidth: 200},
                {toolbar: '#toolbar', title: '操作面板', align: 'center', minWidth: 80, fixed: 'right'},
            ]]
        });


    });

</script>

<!-- 数据操作工具条模板 -->
<script type="text/html" id="toolbar">
    <!--{if auth("edit") }-->
    <a class="layui-btn layui-btn-primary layui-btn-sm" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
    <!--{/if}-->

    <!--{if auth("remove") }-->
    <a class="layui-btn layui-btn-danger layui-btn-sm" data-action="{:url('remove')}" data-value="id#{{d.id}}" data-confirm="确定要删除吗?">删 除</a>
    <!--{/if}-->
</script>
{/block}
